package com.yuncheng.spcyApi.constant.jcy;

/**
 * 遴选计划
 * @author hua
 */
public class JcyLxjhConstant {

    public final static String JCYLX_PXLX_XJCYPX = "新检查员培训";
    public final static String JCYLX_PXLX_JXJYPX = "继续教育培训";

    // 遴选计划-培训二维码状态
    public final static String JCYLX_PXZT_WKS = "不启用";
    public final static String JCYLX_PXZT_QY = "启用";
//    public final static String JCYLX_PXZT_JXZ = "进行中";
//    public final static String JCYLX_PXZT_YJS = "已结束";

    // 遴选计划-采集人员数据审核状态
    public final static String JCYLX_CJRY_SJSHZT_WSH = "待审核";
    public final static String JCYLX_CJRY_SJSHZT_THXG = "退回修改";
    public final static String JCYLX_CJRY_SJSHZT_SHTG = "审核通过";
    public final static String JCYLX_CJRY_SJSHZT_SHBTG = "审核不通过";

    // 遴选计划-培训人员
    public final static String JCYLX_CJRY_KHJG_HG = "通过";
    public final static String JCYLX_CJRY_KHJG_BHG = "不通过";
    public final static String JCYLX_CJRY_KHJG_WKH = "未考核";

    // 遴选计划-考试次数-默认
    public final static Integer JCYLX_CJRY_KSCS = 3;

    // 遴选培训签到场次
    public final static String JCYLX_QDCS_QDZT_BKQ = "不开启";
    public final static String JCYLX_QDCS_QDZT_KQ = "开启";

    /** 检查员身份变更记录 -变更类型 */
    public final static String JCY_SFBG_BGLX_LX = "遴选";
    public final static String JCY_SFBG_BGLX_PR = "聘任";
    public final static String JCY_SFBG_BGLX_JP = "解聘";
    public final static String JCY_SFBG_BGLX_SQJP = "申请解聘";
    public final static String JCY_SFBG_BGLX_TXYP = "退休延聘";

    // 遴选计划状态
    public final static String LX_JHZTS = "计划起草,报名审核,培训管理,培训考核,确认名单,计划完成";
    public final static String LX_JHZT_JHQC = "计划起草";
    public final static String LX_JHZT_BMSH = "报名审核";
    public final static String LX_JHZT_PXGL = "培训管理";
    public final static String LX_JHZT_PXKH = "培训考核";
    public final static String LX_JHZT_DRMD = "确认名单";
    public final static String LX_JHZT_JHWC = "计划完成";

    // 遴选计划状态-第一个状态
    public static String getFirstJhzt(){
        return LX_JHZTS.split(",")[0];
    }

    // 获取遴选计划状态-下一个状态
    public static String getNextLxjhZt(String nowJhzt){
        String nodeNameList[] = LX_JHZTS.split(",");
        for (int i=0; i<nodeNameList.length; i++){
            if (nodeNameList[i].equals(nowJhzt)){
                if (i == nodeNameList.length-1){
                    return nowJhzt;
                }else {
                    return nodeNameList[i+1];
                }
            }
        }
        return "";
    }

    // 获取遴选计划状态-上一个状态
    public static String getPreviousLxjhZt(String nowJhzt){
        String[] nodeNameList = LX_JHZTS.split(",");

        for (int i=0; i<nodeNameList.length; i++){
            if (nodeNameList[i].equals(nowJhzt)){
                if (i==0){
                    return nodeNameList[i];
                }else {
                    int perviousI = i-1; // 上一个环节名称
                    return nodeNameList[perviousI];
                }
            }
        }
        return "";
    }
}
